| Conditions | 1 |
| Total Lines | 31 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | |||
| 12 | constructor(params = {}) { |
||
| 13 | |||
| 14 | super(); |
||
| 15 | |||
| 16 | this.value = params.value; |
||
| 17 | if (isUnd(this.value) || !this.value.subscribe) |
||
| 18 | { |
||
| 19 | this.value = ko.observable(isUnd(this.value) ? false : !!this.value); |
||
| 20 | } |
||
| 21 | |||
| 22 | this.enable = params.enable; |
||
| 23 | if (isUnd(this.enable) || !this.enable.subscribe) |
||
| 24 | { |
||
| 25 | this.enable = ko.observable(isUnd(this.enable) ? true : !!this.enable); |
||
| 26 | } |
||
| 27 | |||
| 28 | this.disable = params.disable; |
||
| 29 | if (isUnd(this.disable) || !this.disable.subscribe) |
||
| 30 | { |
||
| 31 | this.disable = ko.observable(isUnd(this.disable) ? false : !!this.disable); |
||
| 32 | } |
||
| 33 | |||
| 34 | this.label = params.label || ''; |
||
| 35 | this.inline = isUnd(params.inline) ? false : params.inline; |
||
| 36 | |||
| 37 | this.readOnly = isUnd(params.readOnly) ? false : !!params.readOnly; |
||
| 38 | this.inverted = isUnd(params.inverted) ? false : !!params.inverted; |
||
| 39 | |||
| 40 | this.labeled = !isUnd(params.label); |
||
| 41 | this.labelAnimated = !!params.labelAnimated; |
||
| 42 | } |
||
| 43 | |||
| 53 |